package String.exercise;

import java.util.Random;

//生成4个字母随机数
public class Demo7 {
    public static void main(String[] args) {
        Random r=new Random();
        String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        char[] chars = str.toCharArray();
        for (int i = 0; i < 4; i++) {
            int k=r.nextInt(53);
            System.out.print(chars[k]);
        }
    }
}
